package com.coship.vas.dapg.rest;

import javax.ws.rs.Path;

import net.sf.json.JSONObject;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.coship.vas.dapg.service.DynamicAssociationService;
import com.coship.vasadapter.service.TopVasAsset;

@Path("/")
@Component("dynamicAssociationRestService")
public class DynamicAssociationRestService {

	@Autowired
	public DynamicAssociationService dynamicAssociationService;
	
	/**
	 * 取得点播排行
	 * @param limits
	 * @param startRow
	 * @return
	 */
	public String getVODRank(int limits,int startRow)
	{
		TopVasAsset[] assetArray = dynamicAssociationService.getVODRank(limits, startRow);
		return JSONObject.fromObject(assetArray).toString();
	}
	
	/**
	 * 跳转点播节目详情页
	 * @param userid
	 * @return
	 */
	public String getForwardHref(String userid)
	{
		return dynamicAssociationService.getForwardHref(userid);
	}
	
}
